export function getDate(time) {
  return time.replace("T", " ")
}

export function format(time) {
  let year = time.getFullYear() + ""

  let month = time.getMonth() + 1 + ""

  let day = time.getDate()  + ""

  if (time.getMonth() + 1 < 10) {
    month = '0' + month
  }

  if (time.getDate() < 10) {
    day = '0' + day
  }

  return year + '-' + month + '-' + day
}  